﻿using ContactSMS.Commons.QueryParameters;
using ContactSMS.Domain.Entity;
using ContactSMS.Domain.PagedResult;

namespace ContactSMS.Domain
{
    public interface IMessageRepository
    {
        Task<Message?> AddMessageAsync(Message Message);

        Task<List<Message>?> GetMessageByContactIdAsync(long contactId);

        Task<bool> DeleteMessageByContactIdAsync(long ContactId);

        Task<bool> DeleteMessageByContactIdsAsync(long[] contactId);

        Task<List<Message>?> GetMessageByMessageSessionIdAsync(long MessageSessionId);

        Task<bool> DeleteMessageByMessageSessionIdAsync(long MessageSessionId);

        Task<bool> DeleteMessageByMessageSessionIdsAsync(long[] MessageSessionIds);

        Task<PagedMessageResult> GetMessageAsync(MessageQueryParameters parameters, int page = 1, int pageSize = 10, long MessageSessionId = 0);

        Task<bool> DeleteMessageByIdAsync(long id);

        Task<bool> DeleteMessageByIdsAsync(long[] ids);

        Task<bool> DeleteMessageByMobileAsync(string mobile);
    }
}
